#include "cellcluster.h"
#include "application.h"
#include "servicegraphics.h"

namespace infinity {
	namespace render {

CellCluster::CellCluster(dw::uint32 size, Vector3i origin)
:	m_size(size)
,	curindex(0)
,	curvertex(0)
,	m_model(NULL)
,	m_origin(origin)
{
}

CellCluster::~CellCluster()
{
	if (m_model != NULL)
	{
		ServiceGraphics& svcGraphics = Application::getInstance().getService< ServiceGraphics >();
		svcGraphics.releaseModel(m_model);
	}
}

	}//namespace render
} // namespace infinity
